package com.htc.controller;

import com.htc.common.ActionEvent;
import com.htc.constants.Constants;
import com.htc.dlc.EventsActivity;
import com.htc.dlc.fragment.FragmentEvent;
import com.htc.model.utils.EventsModel;
import com.htc.model.utils.NewsModel;

public class EventsController {
	public static EventsController instance;

	public static EventsController getInstance() {
		if (instance == null)
			instance = new EventsController();
		return instance;
	}

	public void handleViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_EVENTS:
			EventsModel.getInstance().handleControllerEvent(e);
			break;
		default:
			break;
		}
	}

	public void handleModelViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_EVENTS:
			FragmentEvent sender = (FragmentEvent) e.sender;
			sender.handleControllerViewEvent(e);
			break;

		default:
			break;
		}
	}
}
